package cn.stylefeng.guns.modular.mapper;

import cn.stylefeng.guns.modular.entity.Schedule;
import cn.stylefeng.guns.modular.entity.Scheduleitem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;

/**
 * @author third_e
 * @create 2019/12/23 0023-下午 5:31
 */
public interface ScheduleitemMapper extends BaseMapper<Scheduleitem> {

    /**
     * 通过日程id查询对应的日程项
     * @param scheduleId
     * @return
     */
    Collection<Scheduleitem> selectScheduleitemByscheduleId(@Param("scheduleId") Long scheduleId);

    /**
     * 删除日程项
     * @param scheduleitemId
     */
    void deleteScheduleitemById(@Param("scheduleitemId") Long scheduleitemId);


    /**
     * 获取今天的日程项
     * @param scheduleId
     * @param scheduleitemDay
     * @return
     */
    Collection<Scheduleitem> getTodayScheduleitem(@Param("scheduleId") Long scheduleId,
                                                  @Param("scheduleitemDay") String scheduleitemDay);

    void deleteAllScheduleitem(@Param("scheduleId") Long scheduleId);


    Scheduleitem getByDayAndFrameitemId(@Param("scheduleitemDay") String scheduleitemDay,
                                        @Param("scheduleId") Long scheduleId,
                                        @Param("frameitemId") Long frameitemId);
}
